#pragma once

#include "../umlmodel_global.h"

#include "UMLBehaviorDiagram.h"
#include "UMLDiagram.h"

namespace uml {
class Activity;

/// <summary>
/// UMLActivityDiagram
/// Shows an Activity and its elements.  Also see Annex A.
/// </summary>
class UMLMODEL_EXPORT UMLActivityDiagram : public UMLDiagram, public UMLBehaviorDiagram {

public: // Constructors and destructors
    explicit UMLActivityDiagram(const QString& umlType="uml::UMLActivityDiagram");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// modelElement getter
    /// Restricts UMLActivityDiagrams to show Activities.
    /// </summary>
    shared_ptr<Activity> modelElement() const;

    /// <summary>
    /// modelElement setter
    /// Restricts UMLActivityDiagrams to show Activities.
    /// </summary>
    void setModelElement(shared_ptr<Activity> value);

    /// <summary>
    /// isActivityFrame getter
    /// Indicates whether the UMLActivityDiagram shall be shown with a frame that is a
    /// round-cornered rectangle without a pentagonal header.
    /// </summary>
    bool isActivityFrame() const;

    /// <summary>
    /// isActivityFrame setter
    /// Indicates whether the UMLActivityDiagram shall be shown with a frame that is a
    /// round-cornered rectangle without a pentagonal header.
    /// </summary>
    void setIsActivityFrame(bool value);

private: // Fields
    /// <summary>
    /// modelElement
    /// Restricts UMLActivityDiagrams to show Activities.
    /// </summary>
    shared_ptr<Activity> modelElement_;

    /// <summary>
    /// isActivityFrame
    /// Indicates whether the UMLActivityDiagram shall be shown with a frame that is a
    /// round-cornered rectangle without a pentagonal header.
    /// </summary>
    const static bool isActivityFrame_default_;
    bool isActivityFrame_= isActivityFrame_default_;

};

} // namespace uml
